#include <iostream>
#include <memory>
#include "UdpServer.hpp"
#include "Route.hpp"

int main() {
    EnableToScreen();
    // 服务器ip一般指定为0，服务器可以收到来自任意ip的信息（只要求端口对应）
    Route route_message;
    server_task_t forword_message = std::bind(&Route::ForwordMessage, 
        &route_message, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
    UdpServer* usvr = new UdpServer(forword_message, "127.0.0.1", 8899);
    usvr->Init();
    usvr->Start();
    
    return 0;
}